/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Item;

/**
 * This is for food.
 * @author Marco
 */
public class Food extends Item{
    private String ingredient;

    public Food(String name, String price, String ingredient){
        super(name, price);
        this.ingredient = ingredient;
    }

    /**
     * @return the main ingredient of food.
     */
    public String getIngredient(){
        return ingredient;
    }

    public String getData(){
        String str = super.getName()+this.getIngredient();
        return str;
    }
    public void print(){
        super.print();
        System.out.println("Main Ingredient:"+ingredient);
    }
}
